package cn.exrick.search.service.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
* @Description:   Es connection
* @Author:         shang
* @CreateDate:     2019/10/22 13:56
* @UpdateUser:     shang
* @UpdateDate:     2019/10/22 13:56
* @UpdateRemark:
* @Version:        1.0
*/
@Configuration
public class EsConnection {

    @Value("${ES_CONNECT_IP}")
    private String connectionIp;
    @Value("${ES_TRANSPORT_PORT}")
    private Integer connectionPort;
    @Value("${ES_CLUSTER_NAME}")
    private String clusterName;

    public String getConnectionIp() {
        return connectionIp;
    }

    public void setConnectionIp(String connectionIp) {
        this.connectionIp = connectionIp;
    }

    public Integer getConnectionPort() {
        return connectionPort;
    }

    public void setConnectionPort(Integer connectionPort) {
        this.connectionPort = connectionPort;
    }

    public String getClusterName() {
        return clusterName;
    }

    public void setClusterName(String clusterName) {
        this.clusterName = clusterName;
    }

    @Override
    public String toString() {
        return "EsConnection{" +
                "connectionIp='" + connectionIp + '\'' +
                ", connectionPort=" + connectionPort +
                ", clusterName='" + clusterName + '\'' +
                '}';
    }
}
